	function getCookie(key){
		let strCookie = document.cookie;
		let arrCookie = strCookie.split("; ");
		
		for(let i=0; i<arrCookie.length; i++){
			let item = arrCookie[i].split("=");
			
			if(key == item[0]){
				return item[1];
			}
		}
		
		return "";
	}
	
	// let name = getCookie("name");
	
	// console.log(name);
	//创建(或修改)cookie
	
	function setCookie(key,value,day){
		if(day != undefined){
			let date = new Date();
			date.setDate(date.getDate()+day);
			document.cookie = `${key}=${value};expires=`+date;
		}else{
			document.cookie = `${key}=${value}`;
		}
	}

	// setCookie("pwd","666",7);	
	// setCookie("age",18);
	
	//删除cookie
	function deleteCookie(key){
		setCookie(key,'',-1);
	}
	